<?php

/*
 * Pagina principal
 *
*/

class Home extends Controller {

    function Home() {
        parent::Controller();
        $this->load->library('session');
        $this->load->language('general',$this->session->userdata('lenguaje'));
    }

    function index($leng="") {
        $datos['titulo_pagina'] = lang('titulo');
        $this->load->helper('url');
        $this->load->view('encabezado', $datos);
        $this->load->model('admin/modelo_modulos');
        $this->modelo_modulos->get_modulos();
        $this->load->view('menu');
        $this->load->model('home_model');
        $this->load->model('noticias_empresa1/modelo_noticias');
        $this->load->view('contenido');
        $this->load->view('pie');
    }

    function grafico() {
        $id = $this->uri->segment(3);
        $datos ="<chart lowerLimit='0' upperLimit='100' lowerLimitDisplay='Bad' upperLimitDisplay='Good' gaugeStartAngle='180' gaugeEndAngle='0' palette='1' numberSuffix='%' tickValueDistance='20' showValue='1'>
        <colorRange>
                <color minValue='0' maxValue='75' code='FF654F'/>
                <color minValue='75' maxValue='90' code='F6BD0F'/>
                <color minValue='90' maxValue='100' code='8BBA00'/>
        </colorRange>
        <dials>
                <dial value='".$id."' rearExtension='10'/>
        </dials>
</chart>";
        echo $datos;
    }
}
?>